<script>
	import Vue from 'vue'
	export default {
		onLaunch: function() {
			uni.getSystemInfo({
				success:function(e){
					Vue.prototype.statusBar = e.statusBarHeight
					//手机版的顶部导航栏高度预设，这部分后期还需要优化一下
					// #ifndef MP
					if(e.platform == 'android') {
						Vue.prototype.customBar = e.statusBarHeight + 40
					}else {
						Vue.prototype.customBar = e.statusBarHeight + 40
					}
					// #endif
					
					// #ifdef MP-WEIXIN
					let custom = wx.getMenuButtonBoundingClientRect()
					Vue.prototype.customBar = custom.bottom + custom.top - e.statusBarHeight
					// #endif
					
					// #ifdef MP-ALIPAY
					Vue.prototype.customBar = e.statusBarHeight + e.titleBarHeight
					// #endif
				}
			})
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
	/*每个页面公共css */
	* {
		margin: 0;
		padding: 0;
	}
	/**
	 * 字体
	 */
	@font-face {
	  font-family: ruizizhenyan;
	  src: url(./static/font/ruizizhenyan.ttf),url(./static/font/ruizizhenyan.otf);
	}
	* {
	  font-family: ruizizhenyan;
	}
</style>
